import { FC } from 'react'
import type { EChartsOption } from 'echarts'

const option: EChartsOption = {
  title: {
    text: '柱状图',
  },
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  },
  yAxis: {
    type: 'value',
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar',
    },
  ],
}

const Basic: FC = () => {
  const [echartsRef] = useEcharts(option)
  return <div ref={echartsRef} className="content-box" />
}

export default Basic
